<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:oso="http://osoftware.com/facelets" template="/WEB-INF/templates/mainSearchLayout.xhtml">

	<ui:define name="title">
		<h:outputText value="#{resourceBundle['patientEvaluation.title']}" />
	</ui:define>

	<ui:define name="searchFields">
		<oso:selectOneMenu id="patientFilter" label="#{resourceBundle['patientEvaluation.patient']}" value="#{patientEvaluationModel.filter.patient}" converter="patientConverter"
			items="#{patientEvaluationModel.selectablePatients}" itemLabel="fullName" />
	</ui:define>

	<ui:define name="listValues">
		<ui:param name="listModel" value="#{patientEvaluationModel.list}" />
		<ui:param name="targetObject" value="#{patientEvaluationModel.editedEntity}" />
	</ui:define>

	<ui:define name="searchColumns">
		<p:column sortBy="#{row.fromDate}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['patientEvaluation.from']}" />
			</f:facet>
			<h:outputText value="#{row.fromDate}">
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" />
			</h:outputText>
		</p:column>
		<p:column sortBy="#{row.toDate}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['patientEvaluation.to']}" />
			</f:facet>
			<h:outputText value="#{row.toDate}">
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" />
			</h:outputText>
		</p:column>
		<p:column sortBy="#{row.specialist.fullName}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['patientEvaluation.specialist']}" />
			</f:facet>
			<h:outputText value="#{row.specialist.fullName}" />
		</p:column>
		<p:column exportable="false">
			<p:rowToggler />
		</p:column>

		<p:rowExpansion>
			<h:panelGrid>
				<h:outputText value="#{row.evaluation}" escape="false" />
			</h:panelGrid>
		</p:rowExpansion>
	</ui:define>

</ui:composition>